/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entidad;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 *
 * @author Battousai
 */
@Entity
@Table(name="SUPERUSUARIO")
public class SuperUsuario implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    private Long cedula;
    private String nombre;
    private char[] contrasena;

    public SuperUsuario() {
    }

    public SuperUsuario(Long cedula, String nombre, char[] contrasena) {
        this.cedula = cedula;
        this.nombre = nombre;
        this.contrasena = contrasena;
    }

    public char[] getContrasena() {
        return contrasena;
    }

    public Long getCedula() {
        return cedula;
    }

    public String getNombre() {
        return nombre;
    }

    public void setCedula(Long cedula) {
        this.cedula = cedula;
    }

    public void setContrasena(char[] contrasena) {
        this.contrasena = contrasena;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    
    public Long getId() {
        return cedula;
    }

    public void setId(Long id) {
        this.cedula = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cedula != null ? cedula.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SuperUsuario)) {
            return false;
        }
        SuperUsuario other = (SuperUsuario) object;
        if ((this.cedula == null && other.cedula != null) || (this.cedula != null && !this.cedula.equals(other.cedula))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return cedula + "-" + nombre;
    }

}
